package com.sasis.model;

import java.util.Collection;

public class Function extends BaseEntity implements Subject, Tree {
	
	private static final long serialVersionUID = 1L;

	private String name;
	
	private Long parentId;
	
	private Long typeId;
	
	private boolean isMenu;
	
	private String url;
	
	private String action;
	
	private boolean usable;
	
	private int scope;
	
	private String memo;
	
	private Collection childs;
	
	private boolean allow;
	
	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public boolean isUsable() {
		return usable;
	}

	public void setUsable(boolean hide) {
		this.usable = hide;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String comment) {
		this.memo = comment;
	}

	public Collection getChilds() {
		return childs;
	}

	public void setChilds(Collection childs) {
		this.childs = childs;
	}

	public int getScope() {
		return scope;
	}

	public void setScope(int dataScope) {
		this.scope = dataScope;
	}

	public Long getTypeId() {
		return typeId;
	}

	public void setTypeId(Long typeId) {
		this.typeId = typeId;
	}

	public boolean isFunction() {
		return true;
	}

	public Subject getParent() {
		return null;
	}

	public boolean isAllow() {
		return allow;
	}

	public void setAllow(boolean allow) {
		this.allow = allow;
	}

	public boolean isMenu() {
		return isMenu;
	}

	public void setMenu(boolean isMenu) {
		this.isMenu = isMenu;
	}

}
